package com.crm.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.util.Date;


/**
 * The persistent class for the PLAN_DETAIL database table.
 * 
 */
@Entity
@Table(name="PLAN_DETAIL")
@NamedQuery(name="PlanDetail.findAll", query="SELECT p FROM PlanDetail p")
public class PlanDetail implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(initialValue = 1, allocationSize = 1,name="PLAN_DETAIL_SALEDETID_GENERATOR", sequenceName="SEQ3")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="PLAN_DETAIL_SALEDETID_GENERATOR")
	@Column(name="SALE_DET_ID")
	private Long saleDetId;

	@Column(name="CLIENT_ID")
	private BigDecimal clientId;

	@Column(name="EXPECT_GAIN")
	private BigDecimal expectGain;

	@Column(name="PLAN_ACCOUNT")
	private BigDecimal planAccount;

	@Column(name="PLAN_DETAIL_IS_DEL")
	private String planDetailIsDel;

	@Column(name="PLAN_MONEY")
	private BigDecimal planMoney;

	@Temporal(TemporalType.DATE)
	@Column(name="PLAN_TIME")
	@JSONField(format="yyyy-MM-dd")
	private Date planTime;

	@Column(name="SALE_PLAN_ID")
	private BigDecimal salePlanId;

	@Temporal(TemporalType.DATE)
	@Column(name="SET_TIME")
	@JSONField(format="yyyy-MM-dd")
	private Date setTime;

	private String spec;

	@Column(name="USER_ID")
	private BigDecimal userId;

	//bi-directional many-to-one association to SalePlan
	@ManyToOne
	@JoinColumn(name="P_ID")
	private SalePlan salePlan;

	public PlanDetail() {
	}

	public Long getSaleDetId() {
		return this.saleDetId;
	}

	public void setSaleDetId(Long saleDetId) {
		this.saleDetId = saleDetId;
	}

	public BigDecimal getClientId() {
		return this.clientId;
	}

	public void setClientId(BigDecimal clientId) {
		this.clientId = clientId;
	}

	public BigDecimal getExpectGain() {
		return this.expectGain;
	}

	public void setExpectGain(BigDecimal expectGain) {
		this.expectGain = expectGain;
	}

	public BigDecimal getPlanAccount() {
		return this.planAccount;
	}

	public void setPlanAccount(BigDecimal planAccount) {
		this.planAccount = planAccount;
	}

	public String getPlanDetailIsDel() {
		return this.planDetailIsDel;
	}

	public void setPlanDetailIsDel(String planDetailIsDel) {
		this.planDetailIsDel = planDetailIsDel;
	}

	public BigDecimal getPlanMoney() {
		return this.planMoney;
	}

	public void setPlanMoney(BigDecimal planMoney) {
		this.planMoney = planMoney;
	}

	public Date getPlanTime() {
		return this.planTime;
	}

	public void setPlanTime(Date planTime) {
		this.planTime = planTime;
	}

	public BigDecimal getSalePlanId() {
		return this.salePlanId;
	}

	public void setSalePlanId(BigDecimal salePlanId) {
		this.salePlanId = salePlanId;
	}

	public Date getSetTime() {
		return this.setTime;
	}

	public void setSetTime(Date setTime) {
		this.setTime = setTime;
	}

	public String getSpec() {
		return this.spec;
	}

	public void setSpec(String spec) {
		this.spec = spec;
	}

	public BigDecimal getUserId() {
		return this.userId;
	}

	public void setUserId(BigDecimal userId) {
		this.userId = userId;
	}

	public SalePlan getSalePlan() {
		return this.salePlan;
	}

	public void setSalePlan(SalePlan salePlan) {
		this.salePlan = salePlan;
	}

}